class(4)[1] "numeric"
Some of the commonly used objects in R are numbers - integer and double (or numeric), character and logical (TRUE/FALSE). The data type of the object can be identified using the in-built R function class(). For example, see the following objects and their types:
class(4)[1] "numeric"
class(4.4)[1] "numeric"
class('4')[1] "character"
class(TRUE)[1] "logical"